#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>

#include<iostream>
using namespace std;

void test()
{
  
}

int main()
{
  //int fd = open("tmp.txt", O_WRONLY | O_CREAT, 0664);
  //if(fd < 0)
  //{
  //  perror("open");
  //  exit(1);
  //}
  //
  //char buff[] = "hello world";
  //write(fd, buff, strlen(buff));

  //close(fd);

  printf("代码段[%p]\n", main);
  printf("代码段[%p]\n", test);

  const char* p1 = "hello";
  const char* p2 = "hello world";
  printf("字符[%p]\n", p1);
  printf("字符[%p]\n", p2);


  int size = 1024 * 1024 * 1024;
  int i;
  for(i = 0; i < 20; ++i)
  {
    //char* p = (char*)malloc(size);
    char* p = new char[size];
    printf("[%p]\n", p);
  }

  return 0;
}
